package com.celesea.framework.util;

/**
 * ${DESCRIPTION}
 *
 * @author JackYuan
 * @create 2017-10-25 16:59
 */
public class Const {

    /**
     * 逻辑标记位
     */
    public static class Bool {
        public static final Byte FALSE = 0;
        public static final Byte TRUE = 1;

        public static Byte valueOf(boolean bool) {
            return bool ? TRUE : FALSE;
        }

        public static boolean isTrue(Byte bool) {
            return bool != null && TRUE.equals(bool);
        }

        public static boolean isFalse(Byte bool) {
            return !isTrue(bool);
        }
    }

    /**
     * 逻辑删除标记位
     */
    public static class DeleteFlag {
        public static final Byte DELETE = 0;
        public static final Byte NORMAL = 1;
    }

    /**
     * 启停用的标记位
     */
    public static class StatusFlag {
        public static final Byte DISABLE = 0;
        public static final Byte ENABLE = 1;
    }
}
